home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / Gooey 1.2 / Gooey 68K ƒ / C Templates / mmCommon.h < prev    next >
Encoding:
Text File  |  1995-01-31  |  37.4 KB  |  921 lines  |  [TEXT/KAHL]

  1. $$Message MM Precompile headers, mmHeaders.c
  2. $$File mmHeaders.c
  3. /*  $CopyRight$ */
  4. /*   mmHeaders                    Type definitions
  5.  
  6.     Name:  mmHeaders.c
  7.     Function:  Precompile headers for Gooey™ code.
  8.     History: $Date$ Original by $Author$
  9.  
  10.  
  11.     To add a header, change its "#if 0" to "#if 1".
  12.     To remove a header, change its "#if 1" to "#if 0".
  13.     
  14.     THINK C NOTE: You must used 'relaxed ANSI' to do the precompile, strict ANSI will
  15.             generate errors.
  16.     
  17. */
  18.  
  19.  
  20. #ifndef _H_MacHeaders
  21. #define _H_MacHeaders
  22.  
  23.  
  24. #if defined(THINK_C) || defined(THINK_CPLUS)
  25. #ifndef __SC__
  26.  
  27. // set this to 0 (zero) to retain full prototypes
  28. // set this to 1 (one) for "simplified" prototypes
  29. #define SIMPLIFY_PROTOTYPES        0
  30.  
  31. #endif
  32. #else
  33.  
  34. //    To allow the use of ToolBox calls which have now become obsolete on PowerPC, but
  35. //    which are still needed for System 6 applications, we need to #define OBSOLETE.  If
  36. //    your application will never use these calls then you can comment out this #define.
  37.  
  38. #define OBSOLETE    1
  39.  
  40. //    Metrowerks-specific Toolbox definitions
  41. //    These definitions are commonly used but not in Apple's headers. We define
  42. //    them in our precompiled header so we can use the Apple headers without modification.
  43.  
  44. #define PtoCstr        p2cstr
  45. #define CtoPstr        c2pstr
  46. #define CtoPString    c2pstr
  47. #define PtoCString    p2cstr
  48.  
  49. #if defined(THINK_C) || defined(THINK_CPLUS)
  50. #define Length(s)    (*(unsigned char *)(s))
  51. #endif
  52. #define topLeft(r)    (((Point *) &(r))[0])
  53. #define botRight(r)    (((Point *) &(r))[1])
  54.  
  55. #define TRUE        true
  56. #define FALSE        false
  57.  
  58. //    We need to include this file 
  59. #include <MixedMode.h>
  60. long GetCurrentA5(void)
  61.  ONEWORDINLINE(0x200D);
  62.  
  63. #endif
  64.  
  65.     #if 0
  66.         #include <ActionAtomIntf.h>
  67.     #endif
  68.     #if 0
  69.         #include <ADSP.h>
  70.     #endif
  71.  
  72.     #if 1
  73.         #include <AEObjects.h>
  74.     #endif
  75.     #if 1
  76.         #include <AEPackObject.h>
  77.     #endif
  78.  
  79.     #if 0
  80.         #include <AERegistry.h>
  81.     #endif
  82.     
  83.     #if 0
  84.         #include <AIFF.h>
  85.     #endif
  86.  
  87.     #if 1
  88.         #ifdef __APPLETALK__
  89.             #include <Aliases.h>
  90.         #else
  91.             #define __APPLETALK__            // suppress unnecessary #include <AppleTalk.h>
  92.             #include <Aliases.h>
  93.             #undef __APPLETALK__
  94.         #endif
  95.     #endif
  96.  
  97.     #if 1
  98.         #ifdef __EPPC__
  99.             #include <AppleEvents.h>
  100.         #else
  101.             #define __EPPC__                // suppress unnecessary #include <EPPC.h>
  102.             #include <AppleEvents.h>
  103.             #undef __EPPC__
  104.         #endif
  105.     #endif
  106.  
  107.     #if 0
  108.         #include <AppleTalk.h>
  109.     #endif
  110.  
  111.     #if 0
  112.         #ifdef __TRAPS__
  113.             #include <Balloons.h>
  114.         #else
  115.             #define __TRAPS__                // suppress unnecessary #include <Traps.h>
  116.             #define _Pack14 0xA830            // (well, mostly unnecessary...)
  117.             #include <Balloons.h>
  118.             #undef _Pack14
  119.             #undef __TRAPS__
  120.         #endif
  121.     #endif
  122.  
  123. #if defined(THINK_C) || defined(THINK_CPLUS)
  124.     #if 1
  125.         #include <BDC.h>
  126.     #endif
  127. #endif
  128.  
  129.     #if 0
  130.         #include <CommResources.h>
  131.     #endif
  132.     #if 0
  133.         #include <Components.h>
  134.     #endif
  135.     #if 0
  136.         #include <Connections.h>
  137.     #endif
  138.     #if 0
  139.         #include <ConnectionTools.h>
  140.     #endif
  141.  
  142.     #if 1
  143.         #include <Controls.h>
  144.     #endif
  145.  
  146.     #if 0
  147.         #include <CRMSerialDevices.h>
  148.     #endif
  149.     #if 0
  150.         #include <CTBUtilities.h>
  151.     #endif
  152.     #if 0
  153.         #include <DatabaseAccess.h>
  154.     #endif
  155.  
  156.     #if 1
  157.         #include <Desk.h>
  158.     #endif
  159.  
  160.     #if 0
  161.         #include <DeskBus.h>
  162.     #endif
  163.  
  164.     #if 1
  165.         #include <Devices.h>
  166.     #endif
  167.     #if 1
  168.         #include <Dialogs.h>
  169.     #endif
  170.     #if 1
  171.         #include <DiskInit.h>
  172.     #endif
  173.  
  174.     #if 0
  175.         #include <Disks.h>
  176.     #endif
  177.     #if 0
  178.         #include <Editions.h>
  179.     #endif
  180.     #if 0
  181.         #include <ENET.h>
  182.     #endif
  183.     #if 0
  184.         #include <EPPC.h>
  185.     #endif
  186.  
  187.     #if 1
  188.         #include <Errors.h>
  189.     #endif
  190.     #if 1
  191.         #include <Events.h>
  192.     #endif
  193.     #if 1
  194.         #include <Files.h>
  195.     #endif
  196.  
  197.     #if 0
  198.         #include <FileTransfers.h>
  199.     #endif
  200.     #if 0
  201.         #include <FileTransferTools.h>
  202.     #endif
  203.     #if 0
  204.         #include <Finder.h>
  205.     #endif
  206.     #if 0
  207.         #include <FixMath.h>
  208.     #endif
  209.  
  210.     #if 1
  211.         #include <Folders.h>
  212.     #endif
  213.     #if 1
  214.         #include <Fonts.h>
  215.     #endif
  216.     #if 1
  217.         #include <GestaltEqu.h>
  218.     #endif
  219.  
  220.     #if 0
  221.         #include <Graf3D.h>
  222.     #endif
  223.     #if 0
  224.         #include <HyperXCmd.h>
  225.     #endif
  226.  
  227.     #if 1
  228.         #include <Icons.h>
  229.     #endif
  230.  
  231.     #if 0
  232.         #include <ImageCodec.h>
  233.     #endif
  234.     #if 0
  235.         #include <ImageCompression.h>
  236.     #endif
  237.     #if 0
  238.         #include <Language.h>
  239.     #endif
  240.  
  241.     #if 1
  242.         #include <Lists.h>
  243.     #endif
  244.  
  245.     #if 0
  246.         #include <MediaHandlers.h>
  247.     #endif
  248.  
  249.     #if 1
  250.         #include <Memory.h>
  251.     #endif
  252.     #if 1
  253.         #include <Menus.h>
  254.     #endif
  255.  
  256.     #if 0
  257.         #include <MIDI.h>
  258.     #endif
  259.     #if 0
  260.         #include <Movies.h>
  261.     #endif
  262.     #if 0
  263.         #include <MoviesFormat.h>
  264.     #endif
  265.         
  266.     #if 1
  267.         #include <Notification.h>
  268.     #endif
  269.     #if 1
  270.         #include <OSEvents.h>
  271.     #endif
  272.     #if 1
  273.         #include <OSUtils.h>
  274.     #endif
  275.     #if 1
  276.         #include <Packages.h>
  277.     #endif
  278.  
  279.     #if 0
  280.         #include <Palette.h>
  281.     #endif
  282.     #if 0
  283.         #include <Palettes.h>
  284.     #endif
  285.     #if 0
  286.         #include <Picker.h>
  287.     #endif
  288.     #if 0
  289.         #include <PictUtil.h>
  290.     #endif
  291.     #if 0
  292.         #include <Power.h>
  293.     #endif
  294.     #if 0
  295.         #include <PPCToolBox.h>
  296.     #endif
  297. #if defined(THINK_C) || defined(THINK_CPLUS)
  298.     #if 0
  299.         #include <Printing.h>
  300.     #endif
  301.  
  302.     #if 1
  303.         #include <PrintTraps.h>
  304.     #endif
  305. #else
  306.     #if 1
  307.         #include <Printing.h>
  308.     #endif
  309. #endif
  310.  
  311.     #if 0
  312.         #include <Processes.h>
  313.     #endif
  314.  
  315.     #if 1
  316.         #include <QDOffscreen.h>
  317.     #endif
  318.     #if 1
  319.         #include <Quickdraw.h>
  320.     #endif
  321.  
  322.     #if 0
  323.         #include <QuickTimeComponents.h>
  324.     #endif
  325.     
  326.     #if 1
  327.         #include <Resources.h>
  328.     #endif
  329.  
  330.     #if 0
  331.         #include <Retrace.h>
  332.     #endif
  333.     #if 0
  334.         #include <ROMDefs.h>
  335.     #endif
  336.     #if 0
  337.         #include <SANE.h>
  338.     #endif
  339.  
  340.     #if 1
  341.         #include <Scrap.h>
  342.     #endif
  343.  
  344.     #if 0
  345.         #include <Script.h>
  346.     #endif
  347.     #if 0
  348.         #include <SCSI.h>
  349.     #endif
  350.  
  351.     #if 1
  352.         #include <SegLoad.h>
  353.     #endif
  354.  
  355.     #if 0
  356.         #include <Serial.h>
  357.     #endif
  358.     #if 0
  359.         #include <ShutDown.h>
  360.     #endif
  361.     #if 0
  362.         #include <Slots.h>
  363.     #endif
  364.  
  365.     #if 1
  366.         #include <Sound.h>
  367.     #endif
  368.  
  369.     #if 0
  370.         #include <SoundInput.h>
  371.     #endif
  372.  
  373.     #if 1
  374.         #include <StandardFile.h>
  375.     #endif
  376.  
  377.     #if 0
  378.         #include <Start.h>
  379.     #endif
  380.     #if 0
  381.         #include <SysEqu.h>
  382.     #endif
  383.     #if 0
  384.         #include <Terminals.h>
  385.     #endif
  386.     #if 0
  387.         #include <TerminalTools.h>
  388.     #endif
  389.  
  390.     #if 1
  391.         #include <TextEdit.h>
  392.     #endif
  393.     #if 1
  394.         #include <Timer.h>
  395.     #endif
  396.     #if 1
  397.         #include <ToolUtils.h>
  398.     #endif
  399.     #if 1
  400.         #include <Types.h>
  401.     #endif
  402.  
  403.     #if 0
  404.         #include <Values.h>
  405.     #endif
  406.     #if 0
  407.         #include <Video.h>
  408.     #endif
  409.  
  410.     #if 1
  411.         #include <Windows.h>
  412.     #endif
  413.  
  414. #if defined(THINK_C) || defined(THINK_CPLUS)
  415.     #if 1
  416.         #include <pascal.h>
  417.     #endif
  418.  
  419.     #if 1
  420.         #include <asm.h>
  421.     #endif
  422. #else
  423.     #if 0
  424.         #include <asm.h>
  425.     #endif
  426. #endif
  427.  
  428. #if defined(THINK_C) || defined(THINK_CPLUS)
  429.     #if 1 && !defined(__cplusplus)
  430.         #include <LoMem.h>
  431.     #endif
  432.  
  433.     #if 1
  434.         #include <THINK.h>
  435.     #endif
  436. #else
  437.     #if 1
  438.         #include <LowMem.h>
  439.     #endif
  440. #endif
  441.  
  442.     #if 0
  443.         #include <Traps.h>
  444.     #endif
  445.  
  446. #endif
  447.  
  448. /* Defined to get around qd. differences */
  449. #if defined(THINK_C) || defined(THINK_CPLUS)
  450. #define            screenRect        screenBits
  451. #define            QDPort                thePort
  452. #else
  453. #define            screenRect        qd.screenBits
  454. #define            QDPort                qd.thePort
  455. #endif
  456.  
  457. #include "mmTypes$Prototype.name$.h"                /* Gooey types */
  458.  
  459. /* ======================================================= */
  460. /* ======================================================= */
  461.  
  462. $$CloseFile
  463. $$Message MM Types, mm:mmTypes$Prototype.name$.h
  464. $$File mm:mmTypes$Prototype.name$.h
  465. /*  $CopyRight$ */
  466. /*   mmTypes$Prototype.name$                        Type definitions
  467.  
  468.     Name:  mmTypes$Prototype.name$.h
  469.     Function:  Type definitions for Gooey™ code.
  470.     History: $Date$ Original by $Author$
  471.  
  472. */
  473.  
  474. /* ======================================================= */
  475. /* ======================================================= */
  476.  
  477. /* Basic definitions */
  478. #define NIL                                0L            /* Used for empty pointers and handles */ 
  479.  
  480. /* User event definitions */
  481. #define UserEvent_None                     0            /* No user events available */
  482. #define UserEvent_Open_Window             1            /* Open Window or modeless dialog */
  483. #define UserEvent_Close_Window             2            /* Close Window or modeless dialog */
  484. #define UserEvent_Activate_Window         3            /* Activate Window or modeless dialog */
  485. #define UserEvent_Deactivate_Window     4            /* Deactivate Window or modeless dialog */
  486. /* IDs 0 to 999 reserved for Gooey™, all others available for special use */
  487.  
  488. /* Menu list resource IDs */
  489. $$Loop Menus
  490. #define Res_Menu_$Menu.name$     $Menu.ID$            /* Menu resource ID, $Menu.FullName$ */
  491. $$Loop MenuItems
  492. #define MItem_$MenuItem.name$     $MenuItem.ID$
  493. $$EndLoop MenuItems
  494.  
  495. $$EndLoop Menus
  496.  
  497. $$Loop HierMenus
  498. #define Res_Menu_$Menu.name$     $Menu.ID$            /* Hier Menu resource ID, $Menu.FullName$ */
  499. $$Loop MenuItems
  500. #define MItem_$MenuItem.name$     $MenuItem.ID$
  501. $$EndLoop MenuItems
  502.  
  503. $$EndLoop HierMenNormalID$
  504. #define ResD_H_$Control.name$    $Control.HilitedID$
  505. $$EndLoop
  506. $$Loop Control.type = List
  507. #define sResD_$Control.name$    $Control.StringID$            /* ...List, $Control.FullName$ */
  508. $$EndLoop
  509. $$Loop Control.type = Popup
  510. #define ResD_$Control.name$    $Control.ItemID$            /* ...Popup menu, $Control.FullName$ */
  511. #define mResD_$Control.name$    $Control.MenuID$
  512. $$EndLoop
  513. $$Loop Control.type = Palette
  514. #define ResD_$Control.name$    $Control.ItemID$            /* ...Palette, $Control.FullName$ */
  515. #define ResD_N_$Control.name$    $Control.NormalID$
  516. $$EndLoop
  517. $$Loop Control.type = HotRect
  518. #define ResD_$Control.name$    $Control.ItemID$            /* ...HotSpot, $Control.FullName$ */
  519. #define sResD_$Control.name$    $Control.StringID$
  520. $$EndLoop
  521. $$Loop Control.type = Sicn
  522. #define ResD_$Control.name$    $Control.ItemID$            /* ...Sicn, $Control.FullName$ */
  523. #define ResD_N_$Control.name$    $Control.NormalID$
  524. #define ResD_H_$Control.name$    $Control.HilitedID$
  525. $$EndLoop
  526.  
  527. $$EndLoop Dialogs
  528. $$Loop Windows
  529. /* Variables for the Window titled  "$Worksheet.FullName$" */
  530. #define ResW_$Worksheet.name$    $Worksheet.ID$            /* Window, $Worksheet.FullName$ */
  531. $$Loop Control.type = Button
  532. #define ResC_$Control.name$    $Control.ID$            /* ...Button, $Control.FullName$ */
  533. $$EndLoop
  534. $$Loop Control.type = Checkbox
  535. #define ResC_$Control.name$    $Control.ID$            /* ...Checkbox, $Control.FullName$ */
  536. $$EndLoop
  537. $$Loop Control.type = Radio
  538. #define ResC_$Control.name$    $Control.ID$            /* ...Radio, $Control.FullName$ */
  539. $$EndLoop
  540. $$Loop Control.type = StaticText
  541. #define sResC_$Control.name$    $Control.StringID$    /* ...Static Text, $Control.FullName$ */
  542. $$EndLoop
  543. $$Loop Control.type = EditText
  544. #define sResC_$Control.name$    $Control.StringID$    /* ...Edit Text, $Control.FullName$ */
  545. $$EndLoop
  546. $$Loop Control.type = List
  547. #define ResC_$Control.name$    $Control.ID$            /* ...List, $Control.FullName$ */
  548. $$EndLoop
  549. $$Loop Control.type = HotRect
  550. #define ResC_$Control.name$    $Control.ID$            /* ...HotSpot, $Control.FullName$ */
  551. #define sResC_$Control.name$    $Control.StringID$
  552. $$EndLoop
  553. $$Loop Control.type = ScrollBar
  554. #define ResC_$Control.name$    $Control.ID$            /* ...ScrollBar, $Control.FullName$ */
  555. $$EndLoop
  556. $$Loop Control.type = Icon
  557. #define ResC_$Control.name$    $Control.ID$            /* ...Icon, $Control.FullName$ */
  558. #define ResC_N_$Control.name$    $Control.NormalID$
  559. #define ResC_H_$Control.name$    $Control.HilitedID$
  560. $$EndLoop
  561. $$Loop Control.type = Picture
  562. #define ResC_$Control.name$    $Control.ID$            /* ...Picture, $Control.FullName$ */
  563. #define ResC_N_$Control.name$    $Control.NormalID$
  564. $$EndLoop
  565. $$Loop Control.type = UButton
  566. #define ResC_$Control.name$    $Control.ID$            /* ...Plugin button, $Control.FullName$ */
  567. #define sResC_$Control.name$    $Control.StringID$
  568. #define ResC_N_$Control.name$    $Control.NormalID$
  569. #define ResC_H_$Control.name$    $Control.HilitedID$
  570. $$EndLoop
  571. $$Loop Control.type = UToggle
  572. #define ResC_$Control.name$    $Control.ID$            /* ...Plugin toggle, $Control.FullName$ */
  573. #define sResC_$Control.name$    $Control.StringID$
  574. #define ResC_N_$Control.name$    $Control.NormalID$
  575. #define ResC_H_$Control.name$    $Control.HilitedID$
  576. $$EndLoop
  577. $$Loop Control.type = UGauge
  578. #define ResC_$Control.name$    $Control.ID$            /* ...Plugin gauge, $Control.FullName$ */
  579. #define sResC_$Control.name$    $Control.StringID$
  580. #define ResC_N_$Control.name$    $Control.NormalID$
  581. #define ResC_H_$Control.name$    $Control.HilitedID$
  582. $$EndLoop
  583. $$Loop Control.type = Popup
  584. #define ResC_$Control.name$    $Control.ID$            /* ...Popup menu, $Control.FullName$ */
  585. #define mResC_$Control.name$    $Control.MenuID$
  586. $$EndLoop
  587. $$Loop Control.type = Palette
  588. #define ResC_$Control.name$    $Control.ID$            /* ...Palette, $Control.FullName$ */
  589. #define ResC_N_$Control.name$    $Control.NormalID$
  590. $$EndLoop
  591. $$Loop Control.type = Sicn
  592. #define ResC_$Control.name$    $Control.ID$            /* ...Sicn, $Control.FullName$ */
  593. #define ResC_N_$Control.name$    $Control.NormalID$
  594. #define ResC_H_$Control.name$    $Control.HilitedID$
  595. $$EndLoop
  596.  
  597. $$EndLoop Windows
  598.  
  599. $$Loop Sounds
  600. #define ResS_$Sound.name$    $Sound.ID$                    /* Sound, $Sound.FullName$ */
  601. $$EndLoop
  602.  
  603. /* ======================================================= */
  604.  
  605. typedef struct UserEventRec{                        /* User Event Record definition */
  606.     short    ID;                                        /* ID for the type of user event */
  607.     short    ID2;                                    /* Optionally used, 2nd ID, sometimes used */
  608.     long    Data1;                                    /* Optionally used, Extra data */
  609.     long    Data2;                                    /* Optionally used, Extra data */
  610.     Handle    theHandle;                                /* Optionally used, Handle */
  611.     struct UserEventRec    **Next;                        /* Handle of next event in the list */
  612. }UserEventRec,*UserEventPRec,**UserEventHRec;
  613.  
  614.  
  615. typedef struct WindowLocRec{                        /* Window location record for Prefs */
  616.     $$Loop ModelessDialogs
  617.     $$if Worksheet.SavePosition
  618.     Point       Loc_$Worksheet.name$;                /* Top Left corner of window */
  619.     $$endif
  620.     $$EndLoop
  621.     $$Loop Windows
  622.     $$if Worksheet.SavePosition
  623.     Point       Loc_$Worksheet.name$;                /* Top Left corner of window */
  624.     $$endif
  625.     $$EndLoop
  626.     short            Pad;                            /* Place holder for empty record */
  627. }WindowLocRec;
  628.  
  629.  
  630. typedef struct HasRec{                                /* Record for Gestalt checks */
  631.     Boolean            ColorQD;                        /* Flag for Color QuickDraw being available */
  632.     Boolean            FPU;                            /* Flag for Floating Point Math Chip being available */
  633.     Boolean            AppleEvents;                    /* Whether AppleEvents are available */
  634.     Boolean            AliasMgr;                        /* Whether AliasMgr is available */
  635.     Boolean            EditionMgr;                        /* Whether EditionMgr is available */
  636.     Boolean            NewStdFile;                        /* Whether HasNewStdFile is available */
  637.     Boolean            PPCToolbox;                        /* Whether PPCToolbox is available */
  638.     Boolean            QuickDraw32Bit;                    /* Whether 32Bit QuickDraw is available */
  639.     Boolean            Gestalt;                        /* Whether Gestalt is available */
  640. }HasRec;
  641.  
  642.  
  643. typedef struct FileRec{                                /* Record for reading and writing files */
  644.     SFTypeList        typeList;                        /* For use in opening files */
  645.     SFReply            Reply;                            /* For use in getting file names */
  646.     StandardFileReply    theStdFileReply;            /* For use in getting file names */
  647.     short            inputRefNum;                    /* For the input file */
  648.     short            outputRefNum;                    /* For the output file */
  649.     Str255             inputFileName;                    /* For the input file */
  650.     Str255             outputFileName;                    /* For the output file */
  651. }FileRec;
  652.  
  653.  
  654. typedef struct PrintingRec{                            /* Record for printing */
  655.     THPrint            hPrint;                            /* Printer record */
  656.     Boolean            PrinterIsOpen;                    /* Whether printer is open or not */
  657.     short            PageCount;                        /* For adding in page number */
  658.     short            LineCount;                        /* For printing */
  659.     short            PrinterVRes,PrinterHRes;        /* Printer resolution */
  660.     short            MaxPrintCharacters;                /* Max characters on one line */
  661.     short            MaxLines;                        /* Maximum lines in one page */
  662.     TPPrPort        pPrPort;                        /* Printer port */
  663.     TPrStatus        prStatus;                        /* Printing status */
  664.     short            CopyCount;                        /* Number of copies to do */
  665. }PrintingRec;
  666.  
  667. /* ======================================================= */
  668.  
  669. $$Loop Alerts
  670. /* Variables for the alert titled  "$Worksheet.FullName$" */
  671. typedef struct $Worksheet.name$Rec{                    /* Record for Alert */
  672.     Boolean            FirstTime;                        /* Flag for first time thru the filter */
  673. $$Loop Control.type = Button
  674.     Boolean            Enable_$Control.name$;            /* ...Button global enable, $Control.FullName$ */
  675. $$EndLoop
  676. $$Loop Control.type = HotRect
  677.     Boolean            Enable_$Control.name$;            /* ...HotSpot global enable, $Control.FullName$ */
  678. $$EndLoop
  679. $$Loop Control.type = Icon
  680.     Boolean            Enable_$Control.name$;            /* ...Icon button global enable, $Control.FullName$ */
  681. $$EndLoop
  682. $$Loop Control.type = Picture
  683. $$if Control.NonGraphic
  684.     Boolean            Enable_$Control.name$;            /* ...Picture button global enable, $Control.FullName$ */
  685. $$endif
  686. $$EndLoop
  687. $$Loop Control.type = UButton
  688.     Boolean            Enable_$Control.name$;            /* ...Plugin Button global enable, $Control.FullName$ */
  689. $$EndLoop
  690. $$Loop Control.type = Sicn
  691.     Boolean            Enable_$Control.name$;            /* ...Sicn global enable, $Control.FullName$ */
  692. $$EndLoop
  693. }$Worksheet.name$Rec;
  694.  
  695. $$EndLoop Alerts
  696. $$Loop Dialogs
  697. /* Variables for the dialog titled  "$Worksheet.FullName$" */
  698. typedef struct $Worksheet.name$Rec{                    /* Record for dialog */
  699.     DialogPtr        theDialog;                        /* Window pointer to this dialog */
  700.     Boolean            ExitDialog;                        /* Flag to exit dialog */
  701. $$Loop Control.type = Button
  702.     Boolean            Enable_$Control.name$;            /* ...Button global enable, $Control.FullName$ */
  703. $$EndLoop
  704. $$Loop Control.type = Checkbox
  705.     Boolean            Enable_$Control.name$;            /* ...Checkbox global enable, $Control.FullName$ */
  706.     short            Value_$Control.name$;
  707. $$EndLoop
  708. $$Loop Control.type = Radio
  709.     Boolean            Enable_$Control.name$;            /* ...Radio global enable, $Control.FullName$ */
  710.     short            Value_$Control.name$;
  711. $$EndLoop
  712. $$Loop Control.type = ScrollBar
  713.     Boolean            Enable_$Control.name$;            /* ...ScrollBar global enable, $Control.FullName$ */
  714.     short            Value_$Control.name$;
  715. $$EndLoop
  716. $$Loop Control.type = Icon
  717.     Boolean            Enable_$Control.name$;            /* ...Icon button global enable, $Control.FullName$ */
  718. $$EndLoop
  719. $$Loop Control.type = Picture
  720. $$if Control.NonGraphic
  721.     Boolean            Enable_$Control.name$;            /* ...Picture button global enable, $Control.FullName$ */
  722. $$endif
  723. $$EndLoop
  724. $$Loop Control.type = EditText
  725.     TEHandle        TE_$Control.name$;                /* ...Edit Text, $Control.FullName$ */
  726.     Str255            TEStr_$Control.name$;
  727.     Rect            TERect_$Control.name$;
  728. $$EndLoop
  729. $$Loop Control.type = UButton
  730.     Boolean            Enable_$Control.name$;            /* ...Plugin Button global enable, $Control.FullName$ */
  731. $$EndLoop
  732. $$Loop Control.type = UToggle
  733.     Boolean            Enable_$Control.name$;            /* ...Plugin toggle global enable, $Control.FullName$ */
  734.     short            Value_$Control.name$;
  735. $$EndLoop
  736. $$Loop Control.type = UGauge
  737.     Boolean            Enable_$Control.name$;            /* ...Plugin guage global enable, $Control.FullName$ */
  738.     short            Value_$Control.name$;
  739. $$EndLoop
  740. $$Loop Control.type = List
  741.     ListHandle        List_$Control.name$;            /* ...List, $Control.FullName$ */
  742.     Rect            ListRect_$Control.name$;
  743. $$EndLoop
  744. $$Loop Control.type = Popup
  745.     Boolean            Enable_$Control.name$;            /* ...Popup menu global enable, $Control.FullName$ */
  746.     short            Value_$Control.name$;
  747. $$EndLoop
  748. $$Loop Control.type = Palette
  749.     Boolean            Enable_$Control.name$;            /* ...Palette global enable, $Control.FullName$ */
  750.     short            Value_$Control.name$;
  751. $$EndLoop
  752. $$Loop Control.type = HotRect
  753.     Boolean            Enable_$Control.name$;            /* ...HotSpot global enable, $Control.FullName$ */
  754.     Rect            Rect_$Control.name$;
  755. $$EndLoop
  756. $$Loop Control.type = Sicn
  757.     Boolean            Enable_$Control.name$;            /* ...Sicn global enable, $Control.FullName$ */
  758. $$EndLoop
  759. }$Worksheet.name$Rec;
  760.  
  761. $$EndLoop
  762. $$Loop Windows
  763. /* Variables for the window titled  "$Worksheet.FullName$" */
  764. typedef struct $Worksheet.name$Rec{                    /* Record for dialog */
  765.     WindowPtr        theWindow;                        /* Window pointer */
  766.     struct $Worksheet.name$Rec    *Next;                /* Handle of next in the list */
  767.     RGBColor        WindowBackColor;                /* Background window color */
  768. $$if Worksheet.Document
  769. $$if Worksheet.ScrollHorz
  770.     ControlHandle    ScrollHHandle;                    /* Scrollbar for horz scrolling */
  771.     short            ScrollHLeftOffset;                /* Offset of control from left side */
  772. $$endif
  773. $$if Worksheet.ScrollVert
  774.     ControlHandle    ScrollVHandle;                    /* Scrollbar for vert scrolling */
  775.     short            ScrollVTopOffset;                /* Offset of control from top edge */
  776. $$endif
  777. $$endif
  778. $$Loop Control.type = Button
  779.     ControlHandle    Ctrl_$Control.name$;            /* ...Button, $Control.FullName$ */
  780.     Boolean            Enable_$Control.name$;
  781. $$EndLoop
  782. $$Loop Control.type = Checkbox
  783.     ControlHandle    Ctrl_$Control.name$;            /* ...Checkbox, $Control.FullName$ */
  784.     Boolean            Enable_$Control.name$;
  785.     short            Value_$Control.name$;
  786. $$EndLoop
  787. $$Loop Control.type = Radio
  788.     ControlHandle    Ctrl_$Control.name$;            /* ...Radio, $Control.FullName$ */
  789.     Boolean            Enable_$Control.name$;
  790.     short            Value_$Control.name$;
  791. $$EndLoop
  792. $$Loop Control.type = ScrollBar
  793.     ControlHandle    Ctrl_$Control.name$;            /* ...ScrollBar, $Control.FullName$ */
  794.     Boolean            Enable_$Control.name$;
  795.     short            Value_$Control.name$;
  796. $$EndLoop
  797. $$Loop Control.type = Icon
  798. $$if Control.NonGraphic
  799.     ControlHandle    Ctrl_$Control.name$;            /* ...Icon button, $Control.FullName$ */
  800.     Boolean            Enable_$Control.name$;
  801. $$endif
  802. $$EndLoop
  803. $$Loop Control.type = Picture
  804. $$if Control.NonGraphic
  805.     ControlHandle    Ctrl_$Control.name$;            /* ...Picture button, $Control.FullName$ */
  806.     Boolean            Enable_$Control.name$;
  807. $$endif
  808. $$EndLoop
  809. $$Loop Control.type = EditText
  810.     TEHandle        TE_$Control.name$;                /* ...Edit Text, $Control.FullName$ */
  811.     Str255            TEStr_$Control.name$;
  812.     Rect            TERect_$Control.name$;
  813. $$EndLoop
  814. $$Loop Control.type = UButton
  815.     ControlHandle    Ctrl_$Control.name$;            /* ...Plugin Button, $Control.FullName$ */
  816.     Boolean            Enable_$Control.name$;
  817. $$EndLoop
  818. $$Loop Control.type = UToggle
  819.     ControlHandle    Ctrl_$Control.name$;            /* ...Plugin toggle, $Control.FullName$ */
  820.     Boolean            Enable_$Control.name$;
  821.     short            Value_$Control.name$;
  822. $$EndLoop
  823. $$Loop Control.type = UGauge
  824.     ControlHandle    Ctrl_$Control.name$;            /* ...Plugin guage, $Control.FullName$ */
  825.     Boolean            Enable_$Control.name$;
  826.     short            Value_$Control.name$;
  827. $$EndLoop
  828. $$Loop Control.type = List
  829.     ListHandle        List_$Control.name$;            /* ...List, $Control.FullName$ */
  830.     Rect            ListRect_$Control.name$;
  831. $$EndLoop
  832. $$Loop Control.type = Popup
  833.     ControlHandle    Ctrl_$Control.name$;            /* ...Popup menu, $Control.FullName$ */
  834.     Boolean            Enable_$Control.name$;
  835.     short            Value_$Control.name$;
  836. $$EndLoop
  837. $$Loop Control.type = Palette
  838.     ControlHandle    Ctrl_$Control.name$;            /* ...Palette, $Control.FullName$ */
  839.     Boolean            Enable_$Control.name$;
  840.     short            Value_$Control.name$;
  841. $$EndLoop
  842. $$Loop Control.type = HotRect
  843.     ControlHandle    Ctrl_$Control.name$;            /* ...HotSpot, $Control.FullName$ */
  844.     Boolean            Enable_$Control.name$;
  845.     Rect            Rect_$Control.name$;
  846. $$EndLoop
  847. $$Loop Control.type = Sicn
  848.     ControlHandle    Ctrl_$Control.name$;            /* ...Sicn, $Control.FullName$ */
  849.     Boolean            Enable_$Control.name$;
  850. $$EndLoop
  851. }$Worksheet.name$Rec,*$Worksheet.name$RecPtr;
  852.  
  853. $$EndLoop
  854.  
  855. /* ======================================================= */
  856. /* ======================================================= */
  857.  
  858. $$CloseFile
  859. $$Message MM Common, mm:mmCommon$Prototype.name$.h
  860. $$File mm:mmCommon$Prototype.name$.h
  861. /*  $CopyRight$ */
  862. /*   mmCommon$Prototype.name$                            Common and Utilitys
  863.  
  864.     Name:  mmCommon$Prototype.name$.h
  865.     Function:  Common for the Gooey™ specific code.
  866.     History: $Date$ Original by $Author$
  867.  
  868. */
  869.  
  870.  
  871. /* ======================================================= */
  872. /* ======================================================= */
  873.  
  874. extern UserEventHRec    UserEventList;                /* User Event record list start */
  875. extern EventRecord        myEvent;                    /* Event record for all events */
  876. extern Boolean            WNE;                        /* WaitNextEvent trap is available */
  877. extern short            SleepValue;                    /* Sleep value for Wait on events */
  878. extern Boolean            doneFlag;                    /* Exit program flag */
  879. extern TEHandle            theInput;                    /* Used in text edit selections */
  880. extern RgnHandle        cursorRgn;                    /* Cursor region for WaitNextEvent */
  881. extern short            ReplyMode;                    /* Reply mode for AppleEvents */
  882.  
  883. extern Rect                tempRect;                    /* Temporary rect, not for long term use */
  884. extern Str255            sTemp;                        /* Temporary string, not for long term use */
  885. extern short            tempChar;                    /* Temporary use character */
  886. extern long                LTemp;                        /* Temporary use long variable */
  887. extern short            DType;                        /* Temporary use Type of dialog item */
  888. extern Handle            DItem;                        /* Temporary use Handle to the dialog item */
  889. extern ControlHandle    CItem;                        /* Temporary use Control handle */
  890.  
  891. extern WindowLocRec        theWindowLocRec;
  892.  
  893. extern Boolean            Doing_MovableModal;            /* For Movable Modal dialogs */
  894. extern Boolean            HoldOffUserEvents;            /* Flag for holding off UserEvents */
  895. extern Boolean            InTheForeground;            /* Flag for running in MultiFinder foreground */
  896.  
  897. extern ProcessSerialNumber        gSelfPSN;
  898. extern AEAddressDesc                    gSelfAddress;
  899.  
  900. extern HasRec            Has;                        /* Gestalt check results */
  901. extern FileRec            Files;                        /* Reading and writing files */
  902. extern PrintingRec        Printing;                    /* Printing */
  903.  
  904. extern RGBColor            Black_ForeColor,White_BackColor;/* Standard colors */
  905.  
  906. $$Loop Menus
  907. extern MenuHandle    Menu_$Menu.name$;                    /* Menu handle, $Menu.FullName$ */
  908. $$EndLoop
  909.  
  910. $$Loop HierMenus
  911. extern MenuHandle    Menu_$Menu.name$;                    /* Hier Menu handle, $Menu.FullName$ */
  912. $$EndLoop
  913.  
  914. $$Loop Alerts
  915. extern    $Worksheet.name$Rec        Rec_$Worksheet.name$;    /* Record for Alert, "$Worksheet.FullName$" */
  916. $$EndLoop Alerts
  917. $$Loop Dialogs
  918. extern    $Worksheet.name$Rec        Rec_$Worksheet.name$;    /* Record for dialog, "$Worksheet.FullName$" */
  919. $$EndLoop
  920. $$Loop Windows
  921. extern    $Wo